home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global gQuantity3, gQuantityTotal3, gCost3, gTotalCost, gTotalSaving, gChickenSaving, gBreadSaving, gSugarSaving, gProductTypes, gList1Quant, gList1Prod, gList1Cost, gList1Total, gList2Quant, gList2Prod, gList2Cost, gList2Total, gList3Quant, gList3Prod, gList3Cost, gList3Total, gList4Quant, gList4Prod, gList4Cost, gList4Total, gList5Quant, gList5Prod, gList5Cost, gList5Total, gList6Quant, gList6Prod, gList6Cost, gList6Total, gList7Quant, gList7Prod, gList7Cost, gList7Total, gList8Quant, gList8Prod, gList8Cost, gList8Total, gList9Quant, gList9Prod, gList9Cost, gList9Total, gList10Quant, gList10Prod, gList10Cost, gList10Total, gList11Quant, gList11Prod, gList11Cost, gList11Total, gList12Quant, gList12Prod, gList12Cost, gList12Total, gList13Quant, gList13Prod, gList13Cost, gList13Total
- if gQuantity3 = member(71).text then
- nothing()
- else
- set the floatPrecision to 0
- gQuantity3 = member(71).text
- gQuantity3 = integer(gQuantity3)
- end if
- if gList3Prod = string("Tate & Lyle Granulated Sugar") then
- set the floatPrecision to 2
- member(205).text = string(gSugarSaving)
- else
- if gList3Quant = 0 then
- nothing()
- else
- if gQuantity3 > 0 then
- set the floatPrecision to 2
- if gList3Prod = string("Iceland 10 (1.6kg) Chicken Drumsticks") then
- gCost3 = gQuantity3 / 2 * 4.0
- if (gQuantity3 mod 2) = 0 then
- gChickenSaving = gQuantity3 * 0.48999999999999999
- else
- gCost3 = gCost3 + 2.49000000000000021
- gChickenSaving = (gQuantity3 - 1) * 0.48999999999999999
- end if
- gTotalSaving = gChickenSaving + gBreadSaving + gSugarSaving
- gList3Quant = gQuantity3
- gList3Total = gCost3
- gTotalCost = gList1Total + gList2Total + gList3Total + gList4Total + gList5Total + gList6Total + gList7Total + gList8Total + gList9Total + gList10Total + gList11Total + gList12Total + gList13Total
- member(89).text = string(gList3Quant & "x")
- member(91).text = gList3Prod
- member(158).text = string("£" & gList3Total)
- member(105).text = string("£" & gTotalSaving)
- member(150).text = string("£" & gTotalCost)
- member(205).text = string(gChickenSaving)
- else
- set the floatPrecision to 2
- if gList3Prod = string("Kingsmill 800g Wmeal Bread") then
- gCost3 = gQuantity3 / 2 * 1.0
- if (gQuantity3 mod 2) = 0 then
- gBreadSaving = gQuantity3 * 0.14999999999999999
- else
- gCost3 = gCost3 + 0.65000000000000002
- gBreadSaving = (gQuantity3 - 1) * 0.14999999999999999
- end if
- gTotalSaving = gChickenSaving + gBreadSaving + gSugarSaving
- gList3Quant = gQuantity3
- gList3Total = gCost3
- gTotalCost = gList1Total + gList2Total + gList3Total + gList4Total + gList5Total + gList6Total + gList7Total + gList8Total + gList9Total + gList10Total + gList11Total + gList12Total + gList13Total
- member(89).text = string(gList3Quant & "x")
- member(91).text = gList3Prod
- member(158).text = string("£" & gList3Total)
- member(105).text = string("£" & gTotalSaving)
- member(150).text = string("£" & gTotalCost)
- member(205).text = string(gBreadSaving)
- else
- set the floatPrecision to 2
- gCost3 = gQuantity3 * gList3Cost
- gList3Quant = gQuantity3
- gList3Total = gCost3
- gTotalCost = gList1Total + gList2Total + gList4Total + gList5Total + gList6Total + gList7Total + gList8Total + gList9Total + gList10Total + gList11Total + gList12Total + gList13Total + (gQuantity3 * gList3Cost)
- member(89).text = string(gList3Quant & "x")
- member(91).text = gList3Prod
- member(158).text = string("£" & gList3Total)
- member(150).text = string("£" & gTotalCost)
- member(205).text = string("0.00")
- end if
- end if
- else
- if gList3Prod = string("Iceland 10 (1.6kg) Chicken Drumsticks") then
- gChickenSaving = 0.0
- else
- if gList3Prod = string("Kingsmill 800g Wmeal Bread") then
- gBreadSaving = 0.0
- else
- nothing()
- end if
- end if
- set the floatPrecision to 2
- gTotalSaving = gChickenSaving + gBreadSaving + gSugarSaving
- member(105).text = string("£" & gTotalSaving)
- gProductTypes = gProductTypes - 1
- member(104).text = string(gProductTypes)
- gList3Quant = gList4Quant
- gList3Prod = gList4Prod
- gList3Cost = gList4Cost
- gList3Total = gList4Total
- gList4Quant = gList5Quant
- gList4Prod = gList5Prod
- gList4Cost = gList5Cost
- gList4Total = gList5Total
- gList5Quant = gList6Quant
- gList5Prod = gList6Prod
- gList5Cost = gList6Cost
- gList5Total = gList6Total
- gList6Quant = gList7Quant
- gList6Prod = gList7Prod
- gList6Cost = gList7Cost
- gList6Total = gList7Total
- gList7Quant = gList8Quant
- gList7Prod = gList8Prod
- gList7Cost = gList8Cost
- gList7Total = gList8Total
- gList8Quant = gList9Quant
- gList8Prod = gList9Prod
- gList8Cost = gList9Cost
- gList8Total = gList9Total
- gList9Quant = gList10Quant
- gList9Prod = gList10Prod
- gList9Cost = gList10Cost
- gList9Total = gList10Total
- gList10Quant = gList11Quant
- gList10Prod = gList11Prod
- gList10Cost = gList11Cost
- gList10Total = gList11Total
- gList11Quant = gList12Quant
- gList11Prod = gList12Prod
- gList11Cost = gList12Cost
- gList11Total = gList12Total
- gList12Quant = gList13Quant
- gList12Prod = gList13Prod
- gList12Cost = gList13Cost
- gList12Total = gList13Total
- gList13Quant = 0
- gList13Prod = "none"
- gList13Cost = 0
- gList13Total = 0
- gTotalCost = gList1Total + gList2Total + gList3Total + gList4Total + gList5Total + gList6Total + gList7Total + gList8Total + gList9Total + gList10Total + gList11Total + gList12Total + gList13Total
- member("productp21_blank3").image = member("productp21_blank4").image
- member(205).text = member(206).text
- if gList4Prod = string("Iceland 9" & numToChar(34) & " Pep & Ham D/Pan Pizza") then
- member("productp21_blank4").image = member("productp21_pizpep").image
- member(206).text = string("0.00")
- else
- if gList4Prod = string("Iceland 9" & numToChar(34) & " Veg Fst T/Crispy Pizza") then
- member("productp21_blank4").image = member("productp21_pizveg").image
- member(206).text = string("0.00")
- else
- if gList4Prod = string("Iceland 9" & numToChar(34) & " Char Ckn T/Crispy Pizza") then
- member("productp21_blank4").image = member("productp21_pizchar").image
- member(206).text = string("0.00")
- else
- if gList4Prod = string("Iceland 9" & numToChar(34) & " Chse Melt D/Pan Pizza") then
- member("productp21_blank4").image = member("productp21_pizchee").image
- member(206).text = string("0.00")
- else
- if gList4Prod = string("Iceland 10" & numToChar(34) & " Mt Comb S/Crust Pizza") then
- member("productp21_blank4").image = member("productp21_pizcom").image
- member(206).text = string("0.00")
- else
- if gList4Prod = string("Iceland 10 (1.6kg) Chicken Drumsticks") then
- member("productp21_blank4").image = member("productp21_drum").image
- member(206).text = string(gChickenSaving)
- else
- if gList4Prod = string("Birds Eye 4 Beef Quarter Pounders") then
- member("productp21_blank4").image = member("productp21_beefburg").image
- member(206).text = string("0.00")
- else
- if gList4Prod = string("Iceland 2 Jumbo Haddock Fillets") then
- member("productp21_blank4").image = member("productp21_haddock").image
- member(206).text = string("0.00")
- else
- if gList4Prod = string("Napolina 400g Chopped Tomatoes") then
- member("productp21_blank4").image = member("productp21_toms").image
- member(206).text = string("0.00")
- else
- if gList4Prod = string("Iceland 500g Pasta Shells") then
- member("productp21_blank4").image = member("productp21_pasta").image
- member(206).text = string("0.00")
- else
- if gList4Prod = string("Kingsmill 800g Wmeal Bread") then
- member("productp21_blank4").image = member("productp21_bread").image
- member(206).text = string(gBreadSaving)
- else
- if gList4Prod = string("Tate & Lyle Granulated Sugar") then
- member("productp21_blank4").image = member("productp21_sugar").image
- member(206).text = string(gSugarSaving)
- else
- member("productp21_blank4").image = member("productp21_blank").image
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- member(79).text = string(gList1Quant & "x")
- member(75).text = gList1Prod
- member(80).text = string("£" & gList1Total)
- member(150).text = string("£" & gTotalCost)
- if gList2Quant = 0 then
- member(74).text = string(EMPTY)
- member(92).text = EMPTY
- member(94).text = string(EMPTY)
- sprite(69).visible = 1
- else
- member(74).text = string(gList2Quant & "x")
- member(92).text = gList2Prod
- member(94).text = string("£" & gList2Total)
- end if
- if gList3Quant = 0 then
- member(89).text = string(EMPTY)
- member(91).text = EMPTY
- member(158).text = string(EMPTY)
- sprite(70).visible = 1
- else
- member(89).text = string(gList3Quant & "x")
- member(91).text = gList3Prod
- member(158).text = string("£" & gList3Total)
- end if
- if gList4Quant = 0 then
- member(159).text = string(EMPTY)
- member(160).text = EMPTY
- member(162).text = string(EMPTY)
- sprite(71).visible = 1
- else
- member(159).text = string(gList4Quant & "x")
- member(160).text = gList4Prod
- member(162).text = string("£" & gList4Total)
- end if
- member(73).text = string("£" & gTotalCost)
- gQuantity1 = gList1Quant
- gQuantityTotal1 = gList1Quant
- gCost1 = 0
- member(69).text = string(gList1Quant)
- gQuantity2 = gList2Quant
- gQuantityTotal2 = gList2Quant
- gCost2 = 0
- member(70).text = string(gQuantity2)
- gQuantity3 = gList3Quant
- gQuantityTotal3 = gList3Quant
- gCost3 = 0
- member(71).text = string(gQuantity3)
- gQuantity4 = gList4Quant
- gQuantityTotal4 = gList4Quant
- gCost4 = 0
- member(81).text = string(gQuantity4)
- end if
- end if
- end
-